diff options
author | Robert Widmann <devteam.codafi@gmail.com> | 2018-04-06 02:31:29 +0000 |
---|---|---|
committer | Robert Widmann <devteam.codafi@gmail.com> | 2018-04-06 02:31:29 +0000 |
commit | f108d57f9b12ec176a87faa46464057d51063d65 (patch) | |
tree | 6950b6fa68cf8841c2613d6f4012637c0e6fdd4b /llvm/tools/llvm-c-test/echo.cpp | |
parent | 9298e077f7a3256aa23f5a962ac50f6b1cc60ed4 (diff) | |
download | bcm5719-llvm-f108d57f9b12ec176a87faa46464057d51063d65.tar.gz bcm5719-llvm-f108d57f9b12ec176a87faa46464057d51063d65.zip |
[LLVM-C] Audit Inline Assembly APIs for Consistency
Summary:
- Add a missing getter for module-level inline assembly
- Add a missing append function for module-level inline assembly
- Deprecate LLVMSetModuleInlineAsm and replace it with LLVMSetModuleInlineAsm2 which takes an explicit length parameter
- Deprecate LLVMConstInlineAsm and replace it with LLVMGetInlineAsm, a function that allows passing a dialect and is not mis-classified as a constant operation
Reviewers: whitequark, deadalnix
Reviewed By: whitequark
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45346
llvm-svn: 329369
Diffstat (limited to 'llvm/tools/llvm-c-test/echo.cpp')
-rw-r--r-- | llvm/tools/llvm-c-test/echo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/llvm-c-test/echo.cpp b/llvm/tools/llvm-c-test/echo.cpp index 4b6423d2fb9..19ad5bd854b 100644 --- a/llvm/tools/llvm-c-test/echo.cpp +++ b/llvm/tools/llvm-c-test/echo.cpp @@ -1002,6 +1002,10 @@ int llvm_echo(void) { if (strcmp(LLVMGetDataLayoutStr(M), LLVMGetDataLayoutStr(Src))) report_fatal_error("Inconsistent DataLayout string representation"); + size_t ModuleInlineAsmLen; + const char *ModuleAsm = LLVMGetModuleInlineAsm(Src, &ModuleInlineAsmLen); + LLVMSetModuleInlineAsm2(M, ModuleAsm, ModuleInlineAsmLen); + declare_symbols(Src, M); clone_symbols(Src, M); char *Str = LLVMPrintModuleToString(M); |