]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - tools/perf/util/c++/clang-test.cpp
perf clang: Allow passing CFLAGS to builtin clang
[karo-tx-linux.git] / tools / perf / util / c++ / clang-test.cpp
index 3da6bfa4bc54a25d6294318eb3e131240c195be1..0f484fbb2b585af2472fb0b707a5710ce8c2def0 100644 (file)
@@ -16,8 +16,9 @@ int test__clang_to_IR(void)
        perf_clang_scope _scope;
 
        std::unique_ptr<llvm::Module> M =
-               perf::getModuleFromSource("perf-test.c",
-                                         "int myfunc(void) {return 1;}");
+               perf::getModuleFromSource({"-DRESULT=1"},
+                                         "perf-test.c",
+                                         "int myfunc(void) {return RESULT;}");
 
        if (!M)
                return -1;