rsmith added inline comments.

================
Comment at: lib/CodeGen/ItaniumCXXABI.cpp:3033
+      return {llvm::GlobalValue::InternalLinkage,
+              llvm::GlobalValue::LinkOnceODRLinkage};
+    return {llvm::GlobalValue::InternalLinkage,
----------------
Shouldn't this be based on the type's linkage? Eg:

```
namespace { struct Incomplete; }
auto x = typeid(Incomplete*);
```

should have an `internal` type info name, not a `linkonce_odr` name. I think we 
should compute the linkage per the code below and then demote the type's 
linkage to internal in the incomplete-class case.


================
Comment at: lib/CodeGen/ItaniumCXXABI.cpp:3034-3035
+              llvm::GlobalValue::LinkOnceODRLinkage};
+    return {llvm::GlobalValue::InternalLinkage,
+            llvm::GlobalValue::InternalLinkage};
+  }
----------------
Should we promote the type info name in this case too? (We get here for the 
incomplete-class type info we generate as a detail of the pointer type info, 
but the names of such types are accessible via the <cxx_abi.h> interface, so it 
seems reasonable to apply the same global-uniqueness to them too.)


https://reviews.llvm.org/D46665



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to