From c68c47198c0e0a610e49eaf072429b9214fca04f Mon Sep 17 00:00:00 2001 From: Karl Schimpf Date: Wed, 3 Jul 2013 11:02:54 -0700 Subject: Don't generate Type ID's for global variable fields. Also removed local MaxGlobalType in WriteModuleInfo because it calls VE.getTypeID(GV->getTYpe(), which is no longer defined for globals. Also noted that MaxAlignment in WriteModuleInfo was no longer used and removed it. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3541 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/18185005 --- lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp') diff --git a/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp b/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp index 393c5bc934..5e2484a3f3 100644 --- a/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp +++ b/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp @@ -243,8 +243,10 @@ void NaClValueEnumerator::EnumerateValue(const Value *V) { return; } - // Enumerate the type of this value. - EnumerateType(V->getType()); + // Enumerate the type of this value. Skip global values since no + // types are dumped for global variables. + if (!isa(V)) + EnumerateType(V->getType()); if (const Constant *C = dyn_cast(V)) { if (isa(C)) { -- cgit v1.2.3-18-g5258