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

Unified Diff: src/IceELFSection.cpp

Issue 1387963002: Make sure that all globals are internal, except for "start" functions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix new tests. Created 5 years, 2 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/IceConverter.cpp ('k') | src/IceGlobalInits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceELFSection.cpp
diff --git a/src/IceELFSection.cpp b/src/IceELFSection.cpp
index 3e33c99a429bc783fcb51267e5e6d5c809b141e3..37681509bb269947fe5e42831f444fcf0d90bb5c 100644
--- a/src/IceELFSection.cpp
+++ b/src/IceELFSection.cpp
@@ -116,7 +116,12 @@ void ELFSymbolTableSection::noteUndefinedSym(const IceString &Name,
NewSymbol.Section = NullSection;
NewSymbol.Number = ELFSym::UnknownNumber;
bool Unique = GlobalSymbols.insert(std::make_pair(Name, NewSymbol)).second;
- assert(Unique);
+ if (!Unique) {
+ std::string Buffer;
+ llvm::raw_string_ostream StrBuf(Buffer);
+ StrBuf << "Symbol external and defined: " << Name;
+ llvm::report_fatal_error(StrBuf.str());
+ }
(void)Unique;
}
« no previous file with comments | « src/IceConverter.cpp ('k') | src/IceGlobalInits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698