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<Decl>(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,
+++ /dev/null
-// 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",