aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Interp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ByteCode/Interp.cpp')
-rw-r--r--clang/lib/AST/ByteCode/Interp.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index b961a41..d5e75a0 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -1493,9 +1493,12 @@ bool CheckDestructor(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
}
static void compileFunction(InterpState &S, const Function *Func) {
+ const FunctionDecl *Definition = Func->getDecl()->getDefinition();
+ if (!Definition)
+ return;
+
Compiler<ByteCodeEmitter>(S.getContext(), S.P)
- .compileFunc(Func->getDecl()->getMostRecentDecl(),
- const_cast<Function *>(Func));
+ .compileFunc(Definition, const_cast<Function *>(Func));
}
bool CallVar(InterpState &S, CodePtr OpPC, const Function *Func,