From: Adrian Prantl Date: Tue, 21 Jan 2014 18:23:43 +0000 (+0000) Subject: revert 199757 for buildbot breakage. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0627310f5d0f2aae9f6198df5997ea5042e90077;p=clang revert 199757 for buildbot breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199758 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index ff17a03dcc..faf6fbba1a 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -739,16 +739,14 @@ llvm::DIType CGDebugInfo::CreateType(const TypedefType *Ty, llvm::DIFile Unit) { return llvm::DIType(); // We don't set size information, but do specify where the typedef was // declared. - SourceLocation Loc = Ty->getDecl()->getLocation(); - llvm::DIFile File = getOrCreateFile(Loc); - unsigned Line = getLineNumber(Loc); + unsigned Line = getLineNumber(Ty->getDecl()->getLocation()); const TypedefNameDecl *TyDecl = Ty->getDecl(); llvm::DIDescriptor TypedefContext = getContextDescriptor(cast(Ty->getDecl()->getDeclContext())); return - DBuilder.createTypedef(Src, TyDecl->getName(), File, Line, TypedefContext); + DBuilder.createTypedef(Src, TyDecl->getName(), Unit, Line, TypedefContext); } llvm::DIType CGDebugInfo::CreateType(const FunctionType *Ty, diff --git a/test/CodeGen/debug-info-typedef.c b/test/CodeGen/debug-info-typedef.c deleted file mode 100644 index c3adcf12aa..0000000000 --- a/test/CodeGen/debug-info-typedef.c +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: %clang_cc1 -emit-llvm -g -I%p %s -o - | FileCheck %s -// Test that the location of the typedef points to the header file. -#include "typedef.h" - -MyType a; - -// CHECK: metadata ![[HEADER:[0-9]+]]} ; [ DW_TAG_typedef ] [MyType] [line 1, size 0, align 0, offset 0] [from int] -// CHECK: ![[HEADER]] = {{.*}}debug-info-typedef.h", diff --git a/test/CodeGen/debug-info-typedef.h b/test/CodeGen/debug-info-typedef.h deleted file mode 100644 index afdb9fb13c..0000000000 --- a/test/CodeGen/debug-info-typedef.h +++ /dev/null @@ -1,2 +0,0 @@ -typedef int MyType; -