[llvm-branch-commits] [llvm-branch] r259801 - Merging r259695:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Feb 4 08:59:46 PST 2016
Author: hans
Date: Thu Feb 4 10:59:45 2016
New Revision: 259801
URL: http://llvm.org/viewvc/llvm-project?rev=259801&view=rev
Log:
Merging r259695:
------------------------------------------------------------------------
r259695 | tfiala | 2016-02-03 13:13:23 -0800 (Wed, 03 Feb 2016) | 11 lines
Address NDEBUG-related linkage issues for Value::assertModuleIsMaterialized()
The IR/Value class had a linkage issue present when LLVM was built
as a library, and the LLVM library build time had different settings
for NDEBUG than the client of the LLVM library. Clients could get
into a state where the LLVM lib expected
Value::assertModuleIsMaterialized() to be inline-defined in the header
but clients expected that method to be defined in the LLVM library.
See this llvm-commits thread for more details:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160201/329667.html
------------------------------------------------------------------------
Modified:
llvm/branches/release_38/ (props changed)
llvm/branches/release_38/include/llvm/IR/Value.h
llvm/branches/release_38/lib/IR/Value.cpp
Propchange: llvm/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 4 10:59:45 2016
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177,259228,259236,259342,259346,259375,259645,259649,259740
+/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177,259228,259236,259342,259346,259375,259645,259649,259695,259740
Modified: llvm/branches/release_38/include/llvm/IR/Value.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/include/llvm/IR/Value.h?rev=259801&r1=259800&r2=259801&view=diff
==============================================================================
--- llvm/branches/release_38/include/llvm/IR/Value.h (original)
+++ llvm/branches/release_38/include/llvm/IR/Value.h Thu Feb 4 10:59:45 2016
@@ -280,11 +280,7 @@ public:
// when using them since you might not get all uses.
// The methods that don't start with materialized_ assert that modules is
// fully materialized.
-#ifdef NDEBUG
- void assertModuleIsMaterialized() const {}
-#else
void assertModuleIsMaterialized() const;
-#endif
bool use_empty() const {
assertModuleIsMaterialized();
Modified: llvm/branches/release_38/lib/IR/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/IR/Value.cpp?rev=259801&r1=259800&r2=259801&view=diff
==============================================================================
--- llvm/branches/release_38/lib/IR/Value.cpp (original)
+++ llvm/branches/release_38/lib/IR/Value.cpp Thu Feb 4 10:59:45 2016
@@ -313,8 +313,8 @@ void Value::takeName(Value *V) {
ST->reinsertValue(this);
}
-#ifndef NDEBUG
void Value::assertModuleIsMaterialized() const {
+#ifndef NDEBUG
const GlobalValue *GV = dyn_cast<GlobalValue>(this);
if (!GV)
return;
@@ -322,8 +322,10 @@ void Value::assertModuleIsMaterialized()
if (!M)
return;
assert(M->isMaterialized());
+#endif
}
+#ifndef NDEBUG
static bool contains(SmallPtrSetImpl<ConstantExpr *> &Cache, ConstantExpr *Expr,
Constant *C) {
if (!Cache.insert(Expr).second)
More information about the llvm-branch-commits
mailing list