Skip to content

Commit 3fed3bf

Browse files
authored
[clang][bytecode][NFC] Fix getting references to local function ptrs (#129852)
This is the same thing we do for globals and parameters.
1 parent d1bcac0 commit 3fed3bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6325,7 +6325,7 @@ bool Compiler<Emitter>::visitDeclRef(const ValueDecl *D, const Expr *E) {
63256325
if (auto It = Locals.find(D); It != Locals.end()) {
63266326
const unsigned Offset = It->second.Offset;
63276327
if (IsReference)
6328-
return this->emitGetLocal(PT_Ptr, Offset, E);
6328+
return this->emitGetLocal(classifyPrim(E), Offset, E);
63296329
return this->emitGetPtrLocal(Offset, E);
63306330
} else if (auto GlobalIndex = P.getGlobal(D)) {
63316331
if (IsReference) {

0 commit comments

Comments
 (0)