summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-05-14 11:35:44 +0000
committerPavel Labath <labath@google.com>2018-05-14 11:35:44 +0000
commitc370f2625145aec2ac70a49c3b1ff5a82fc2f92f (patch)
tree276f81bd1d3c5df154fcf42b02bf1030467eb8c3 /clang/lib/CodeGen
parentdffc4ca4f22b6649838752d65a05b7d366425d6a (diff)
downloadbcm5719-llvm-c370f2625145aec2ac70a49c3b1ff5a82fc2f92f.tar.gz
bcm5719-llvm-c370f2625145aec2ac70a49c3b1ff5a82fc2f92f.zip
Revert "[CodeGen] Disable aggressive structor optimizations at -O0"
It breaks the sanitizer build <http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/23739> This reverts commit r332228. llvm-svn: 332232
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/ItaniumCXXABI.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp
index 89a05769e03..e7d4d8ac295 100644
--- a/clang/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp
@@ -3630,16 +3630,12 @@ static StructorCodegen getCodegenToUse(CodeGenModule &CGM,
}
llvm::GlobalValue::LinkageTypes Linkage = CGM.getFunctionLinkage(AliasDecl);
- // Only use RAUW in optimized code, as it makes the complete structor symbol
- // disappear completely, which degrades debugging experience.
- if (CGM.getCodeGenOpts().OptimizationLevel > 0) {
- if (llvm::GlobalValue::isDiscardableIfUnused(Linkage))
- return StructorCodegen::RAUW;
-
- // FIXME: Should we allow available_externally aliases?
- if (!llvm::GlobalAlias::isValidLinkage(Linkage))
- return StructorCodegen::RAUW;
- }
+ if (llvm::GlobalValue::isDiscardableIfUnused(Linkage))
+ return StructorCodegen::RAUW;
+
+ // FIXME: Should we allow available_externally aliases?
+ if (!llvm::GlobalAlias::isValidLinkage(Linkage))
+ return StructorCodegen::RAUW;
if (llvm::GlobalValue::isWeakForLinker(Linkage)) {
// Only ELF and wasm support COMDATs with arbitrary names (C5/D5).
OpenPOWER on IntegriCloud