Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Unified Diff: src/IceGlobalInits.h

Issue 1180883002: Subzero: Fix lit and cross tests broken in f8b4cc8. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | tests_lit/llvm2ice_tests/elf_container.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalInits.h
diff --git a/src/IceGlobalInits.h b/src/IceGlobalInits.h
index 8b060419652aab2eaba3c1e32468a69f3c7bf129..4c51606c6419f9aa13428c405a3481baa9c9eb53 100644
--- a/src/IceGlobalInits.h
+++ b/src/IceGlobalInits.h
@@ -286,9 +286,15 @@ public:
}
bool getSuppressMangling() const final {
+ if (ForceSuppressMangling)
+ return true;
return isExternal() && !hasInitializer();
}
+ void setSuppressMangling() {
+ ForceSuppressMangling = true;
+ }
+
private:
// list of initializers for the declared variable.
InitializerListType Initializers;
@@ -296,11 +302,13 @@ private:
uint32_t Alignment;
// True if a declared (global) constant.
bool IsConstant;
+ // If set to true, force getSuppressMangling() to return true.
+ bool ForceSuppressMangling;
VariableDeclaration()
: GlobalDeclaration(VariableDeclarationKind,
llvm::GlobalValue::InternalLinkage),
- Alignment(0), IsConstant(false) {}
+ Alignment(0), IsConstant(false), ForceSuppressMangling(false) {}
};
template <class StreamType>
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | tests_lit/llvm2ice_tests/elf_container.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698