Kill ModuleProvider and ghost linkage by inverting the relationship between
[oota-llvm.git] / lib / Target / X86 / X86Subtarget.cpp
index 2039be7c9b3d6f8fce0944254ae9d1856249e560..adef5bcb48020d89a3cc3e7fb5c7d68d169b9ba6 100644 (file)
@@ -53,9 +53,9 @@ ClassifyGlobalReference(const GlobalValue *GV, const TargetMachine &TM) const {
   if (GV->hasDLLImportLinkage())
     return X86II::MO_DLLIMPORT;
 
-  // GV with ghost linkage (in JIT lazy compilation mode) do not require an
+  // Materializable GVs (in JIT lazy compilation mode) do not require an
   // extra load from stub.
-  bool isDecl = GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode();
+  bool isDecl = GV->isDeclaration() && !GV->isMaterializable();
 
   // X86-64 in PIC mode.
   if (isPICStyleRIPRel()) {