[PATCH] D78125: [AVR] Use the correct address space for non-prototyped function calls

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 12:24:45 PDT 2020


rjmccall added inline comments.


================
Comment at: clang/lib/CodeGen/CGExpr.cpp:5051
     llvm::Type *CalleeTy = getTypes().GetFunctionType(FnInfo);
-    CalleeTy = CalleeTy->getPointerTo();
+    int AS = getTypes().getDataLayout().getProgramAddressSpace();
+    CalleeTy = CalleeTy->getPointerTo(AS);
----------------
`CalleePtr->getType()->getPointerAddressSpace()` should be fine.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78125/new/

https://reviews.llvm.org/D78125





More information about the llvm-commits mailing list