[WebAssembly] Explicily disable comdat support for wasm output
For now at least. We clearly need some kind of comdat or linkonce_odr support for wasm but currently COMDAT is not supported. Disable COMDAT support in the same way we do the Mach-O. This also causes clang not to generated COMDATs. Differential Revision: https://reviews.llvm.org/D39873 llvm-svn: 318123
This commit is contained in:
@@ -1825,10 +1825,10 @@ Expected<Value *> BitcodeReader::recordValue(SmallVectorImpl<uint64_t> &Record,
|
||||
auto *GO = dyn_cast<GlobalObject>(V);
|
||||
if (GO) {
|
||||
if (GO->getComdat() == reinterpret_cast<Comdat *>(1)) {
|
||||
if (TT.isOSBinFormatMachO())
|
||||
GO->setComdat(nullptr);
|
||||
else
|
||||
if (TT.supportsCOMDAT())
|
||||
GO->setComdat(TheModule->getOrInsertComdat(V->getName()));
|
||||
else
|
||||
GO->setComdat(nullptr);
|
||||
}
|
||||
}
|
||||
return V;
|
||||
|
||||
Reference in New Issue
Block a user