summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-16 16:36:23 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-16 16:36:23 +0000
commit02083539a328f9457365c400a82b496ef6de66a8 (patch)
tree200e8cf841fdce7a3b1d5115373ec921d7f44a8e /llvm/examples/Kaleidoscope
parente851e0426298980173ae9d486d068beab5fa1274 (diff)
downloadbcm5719-llvm-02083539a328f9457365c400a82b496ef6de66a8.tar.gz
bcm5719-llvm-02083539a328f9457365c400a82b496ef6de66a8.zip
DebugInfo: Remove DIDescriptor from the DIBuilder API
As a step toward killing `DIDescriptor` and its subclasses, remove it from the `DIBuilder` API. Replace the subclasses with appropriate pointers from the new debug info hierarchy. There are a couple of possible surprises in type choices for out-of-tree frontends: - Subroutine types: `MDSubroutineType`, not `MDCompositeTypeBase`. - Composite types: `MDCompositeType`, not `MDCompositeTypeBase`. - Scopes: `MDScope`, not `MDNode`. - Generic debug info nodes: `DebugNode`, not `MDNode`. This is part of PR23080. llvm-svn: 235111
Diffstat (limited to 'llvm/examples/Kaleidoscope')
-rw-r--r--llvm/examples/Kaleidoscope/Chapter8/toy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp
index 21f2eb1d3ad..c7e096cc484 100644
--- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp
@@ -836,7 +836,7 @@ void DebugInfo::emitLocation(ExprAST *AST) {
DebugLoc::get(AST->getLine(), AST->getCol(), Scope));
}
-static DICompositeType CreateFunctionType(unsigned NumArgs, DIFile Unit) {
+static MDSubroutineType *CreateFunctionType(unsigned NumArgs, DIFile Unit) {
SmallVector<Metadata *, 8> EltTys;
DIType DblTy = KSDbgInfo.getDoubleTy();
@@ -1226,7 +1226,7 @@ Function *PrototypeAST::Codegen() {
// Create a subprogram DIE for this function.
DIFile Unit = DBuilder->createFile(KSDbgInfo.TheCU->getFilename(),
KSDbgInfo.TheCU->getDirectory());
- DIDescriptor FContext = Unit;
+ MDScope *FContext = Unit;
unsigned LineNo = Line;
unsigned ScopeLine = Line;
DISubprogram SP = DBuilder->createFunction(
OpenPOWER on IntegriCloud