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

Unified Diff: src/IceGlobalContext.cpp

Issue 889613004: Track undefined sym in the symtab. Remove hack for missing relocs against undef. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: separate asserts Created 5 years, 11 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.h ('k') | src/IceTargetLoweringX8632.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.cpp
diff --git a/src/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
index 8805cea111ec69b3760ac52ffe6ce8009a744686..7b782e94641a28d1faad66841dde31ca2a36b53d 100644
--- a/src/IceGlobalContext.cpp
+++ b/src/IceGlobalContext.cpp
@@ -105,6 +105,8 @@ public:
TypePool<IceType_i32, int32_t, ConstantInteger32> Integers32;
TypePool<IceType_i64, int64_t, ConstantInteger64> Integers64;
TypePool<IceType_i32, RelocatableTuple, ConstantRelocatable> Relocatables;
+ TypePool<IceType_i32, RelocatableTuple, ConstantRelocatable>
+ ExternRelocatables;
UndefPool Undefs;
};
@@ -422,6 +424,13 @@ Constant *GlobalContext::getConstantSym(RelocOffsetT Offset,
this, RelocatableTuple(Offset, Name, SuppressMangling));
}
+Constant *GlobalContext::getConstantExternSym(const IceString &Name) {
+ const RelocOffsetT Offset = 0;
+ const bool SuppressMangling = true;
+ return getConstPool()->ExternRelocatables.getOrAdd(
+ this, RelocatableTuple(Offset, Name, SuppressMangling));
+}
+
Constant *GlobalContext::getConstantUndef(Type Ty) {
return getConstPool()->Undefs.getOrAdd(this, Ty);
}
@@ -494,6 +503,10 @@ ConstantList GlobalContext::getConstantPool(Type Ty) {
llvm_unreachable("Unknown type");
}
+ConstantList GlobalContext::getConstantExternSyms() {
+ return getConstPool()->ExternRelocatables.getConstantPool();
+}
+
TimerStackIdT GlobalContext::newTimerStackID(const IceString &Name) {
if (!ALLOW_DUMP)
return 0;
« no previous file with comments | « src/IceGlobalContext.h ('k') | src/IceTargetLoweringX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698