Failure on Windows:
LLVM ERROR: Associative COMDAT symbol 'c' does not exist.
This reverts commit
76b3f0b4d5a0b8c54147c4c73a30892bbca76467 while
I investigate the problem and a solution that still triggers the
original problem.
assert(!I->second->isDeclaration() &&
"Discard should only apply to definitions");
I->second->setLinkage(GlobalValue::AvailableExternallyLinkage);
- // According to the IR verifier, "Declaration[s] may not be in a Comdat!"
- // Remove it, if this is a GlobalObject.
- if (auto *GO = dyn_cast<GlobalObject>(I->second))
- GO->setComdat(nullptr);
SymbolToDefinition.erase(I);
}
+++ /dev/null
-$c = comdat any
-
-define i32 @f() comdat($c) {
-entry:
- ret i32 0
-}
+++ /dev/null
-; RUN: lli -extra-module %p/Inputs/weak-comdat-def.ll %s
-
-$c = comdat any
-
-define weak i32 @f() comdat($c) {
-entry:
- ret i32 0
-}
-
-define i32 @main() {
-entry:
- %0 = call i32 @f()
- ret i32 %0
-}