[all-commits] [llvm/llvm-project] 436bbc: [llvm-c] Add functions for enabling and creating o...
Nicolas Abram via All-commits
all-commits at lists.llvm.org
Mon May 16 01:54:04 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 436bbce7657df830dcebd16b2ad675be56f58681
https://github.com/llvm/llvm-project/commit/436bbce7657df830dcebd16b2ad675be56f58681
Author: Nicolas Abram Lujan <abramlujan at gmail.com>
Date: 2022-05-16 (Mon, 16 May 2022)
Changed paths:
M llvm/include/llvm-c/Core.h
M llvm/lib/IR/Core.cpp
M llvm/test/Bindings/llvm-c/echo.ll
M llvm/tools/llvm-c-test/echo.cpp
M llvm/tools/llvm-c-test/llvm-c-test.h
M llvm/tools/llvm-c-test/main.c
Log Message:
-----------
[llvm-c] Add functions for enabling and creating opaque pointers
This is based on https://reviews.llvm.org/D125168 which adds a
wrapper to allow use of opaque pointers from the C API.
I added an opaque pointer mode test to echo.ll, and to fix assertions
that forbid the use of mixed typed and opaque pointers that were
triggering in it I had to also add wrappers for setOpaquePointers()
and isOpaquePointer().
I also changed echo.ll to remove a bitcast i32* %x to i8*, because
passing it through llvm-as and llvm-dis was generating a
%0 = bitcast ptr %x to ptr, but when building that same bitcast in
echo.cpp it was getting elided by IRBuilderBase::CreateCast
(https://github.com/llvm/llvm-project/blob/08ac66124874d70dab63c731da0244f9e29ef168/llvm/include/llvm/IR/IRBuilder.h#L1998-L1999).
Differential Revision: https://reviews.llvm.org/D125183
More information about the All-commits
mailing list