1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

Revert "[DebugInfo] Support to emit debugInfo for extern variables"

This reverts commit d77ae1552fc21a9f3877f3ed7e13d631f517c825.

The tests committed along with this change do not pass, and should be
changed to use %clang_cc1.
This commit is contained in:
Reid Kleckner 2019-12-22 12:54:06 -08:00
parent 91f450a3a0
commit 51fc04842b
4 changed files with 5 additions and 6 deletions

View File

@ -583,7 +583,7 @@ namespace llvm {
/// specified)
DIGlobalVariableExpression *createGlobalVariableExpression(
DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File,
unsigned LineNo, DIType *Ty, bool isLocalToUnit, bool isDefined = true,
unsigned LineNo, DIType *Ty, bool isLocalToUnit,
DIExpression *Expr = nullptr, MDNode *Decl = nullptr,
MDTuple *templateParams = nullptr, uint32_t AlignInBits = 0);

View File

@ -640,14 +640,13 @@ static void checkGlobalVariableScope(DIScope *Context) {
DIGlobalVariableExpression *DIBuilder::createGlobalVariableExpression(
DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *F,
unsigned LineNumber, DIType *Ty, bool isLocalToUnit,
bool isDefined, DIExpression *Expr,
unsigned LineNumber, DIType *Ty, bool isLocalToUnit, DIExpression *Expr,
MDNode *Decl, MDTuple *templateParams, uint32_t AlignInBits) {
checkGlobalVariableScope(Context);
auto *GV = DIGlobalVariable::getDistinct(
VMContext, cast_or_null<DIScope>(Context), Name, LinkageName, F,
LineNumber, Ty, isLocalToUnit, isDefined, cast_or_null<DIDerivedType>(Decl),
LineNumber, Ty, isLocalToUnit, true, cast_or_null<DIDerivedType>(Decl),
templateParams, AlignInBits);
if (!Expr)
Expr = createExpression();

View File

@ -1289,7 +1289,7 @@ LLVMMetadataRef LLVMDIBuilderCreateGlobalVariableExpression(
return wrap(unwrap(Builder)->createGlobalVariableExpression(
unwrapDI<DIScope>(Scope), {Name, NameLen}, {Linkage, LinkLen},
unwrapDI<DIFile>(File), LineNo, unwrapDI<DIType>(Ty), LocalToUnit,
true, unwrap<DIExpression>(Expr), unwrapDI<MDNode>(Decl),
unwrap<DIExpression>(Expr), unwrapDI<MDNode>(Decl),
nullptr, AlignInBits));
}

View File

@ -764,7 +764,7 @@ protected:
DBuilder.createGlobalVariableExpression(
Subprogram, "unattached", "unattached", File, 1,
DBuilder.createNullPtrType(), false, true, Expr);
DBuilder.createNullPtrType(), false, Expr);
auto *Entry = BasicBlock::Create(C, "", F);
IBuilder.SetInsertPoint(Entry);