diff options
| -rw-r--r-- | llvm/examples/Kaleidoscope/Chapter8/toy.cpp | 2 | ||||
| -rw-r--r-- | llvm/include/llvm/IR/DebugInfo.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp index 8dfec4b2eba..2838d6df593 100644 --- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp @@ -1234,7 +1234,7 @@ Function *PrototypeAST::Codegen() { CreateFunctionType(Args.size(), Unit), false /* internal linkage */, true /* definition */, ScopeLine, DIDescriptor::FlagPrototyped, false, F); - KSDbgInfo.FnScopeMap[this] = (DIScope)SP; + KSDbgInfo.FnScopeMap[this] = SP; return F; } diff --git a/llvm/include/llvm/IR/DebugInfo.h b/llvm/include/llvm/IR/DebugInfo.h index 56033dfead0..46ebcb4b8df 100644 --- a/llvm/include/llvm/IR/DebugInfo.h +++ b/llvm/include/llvm/IR/DebugInfo.h @@ -437,6 +437,7 @@ public: : N(const_cast<MDSubprogram *>(N)) {} operator DIDescriptor() const { return N; } + operator DIScope() const { return N; } operator MDSubprogram *() const { return N; } MDSubprogram *operator->() const { return N; } MDSubprogram &operator*() const { return *N; } |

