Skip to main content

Questions tagged [clang]

For questions about the clang LLVM compiler front end. For general questions about C, use the C tag.

1 vote
0 answers
6 views

Different basicblocks share the same object ID in LLVM

I use the following code to print the basicblocks in my LLVM module's object ID. To my surprise, different basicblocks share the same object ID, how could that be possible? I got foo Block ID: ...
zell's user avatar
  • 10k
0 votes
0 answers
3 views

Can't build pkgconfig on macOS: incompatible integer to pointer conversion

I am trying to build pkgconfig 0.29 on macOS, using clang. I get these errors: gatomic.c:392:10: error: incompatible integer to pointer conversion passing 'gssize' (aka 'long') to parameter of type '...
Arno's user avatar
  • 301
-5 votes
0 answers
38 views

VSCode C++ ld: symbol(s) not found for architecture arm64 problem in Mac [closed]

I have issue about the vscode with c++ when i run the single file like hello world its working good but gives this error when the header file and other files are included in the include event When ı ...
Burak Kocabaş's user avatar
-2 votes
2 answers
56 views

Call file-private function before its definition without manual declaration [duplicate]

For code modularity I like to subdivide long functions into a few smaller ones like so void main_function() { step_1(); step_2(); } static inline void step_1() { // code } static inline ...
simd's user avatar
  • 1,957
0 votes
0 answers
23 views

Compiling CUDA programs with clang takes over an hour [closed]

I am using clang-18 to compile CUDA programs, and the compilation process does not report any errors, but it takes a very long time (even over an hour). The program can be compiled very quickly using ...
putong's user avatar
  • 1
-2 votes
0 answers
23 views

Swig CLang C++ Libraries Exceptions Crash Our Android App [closed]

Our android app have business layer which developed by c++ and deployed with swig clang and ndk23 to so libraries. Before ndk23 we have use gnu compiler and ndk15 and it works without problem if we ...
Cafer Aydın's user avatar
-1 votes
0 answers
18 views

cython (cglan) hangs on m3 macOS Sonoma x86_64

I have a python program that I've been working with for years and building on a macOS Catalina (x86) machine. The python code is Cythonized for speed and some code security (obfuscation). This has ...
geoffr98's user avatar
0 votes
1 answer
21 views

Does LLVM iterate over blocks in a fixed order?

I am using LLVM to iterator basic blocks by for (const Function &F : *M) for (const BasicBlock &BB : F) for (const Instruction &I : BB){ ...... } I want to know: ...
Student Popper's user avatar
-1 votes
0 answers
41 views

Based on `Microsoft` style, how does clang-format automatically delete the blank line before the left brace? [closed]

How to automatically delete the empty line before the left brace? I always manully delete this empty line. How to automatically delete thit line? How to automatically delete thit line? Here is my ....
XyKong's user avatar
  • 1
1 vote
1 answer
73 views

Why do I get a "for declaration does not refer into a class, class template or class template partial specialization" on Clang and not GCC [duplicate]

I currently have this block of code which does not throw a compiler error on GCC, but throws this compiler error on clang: error: nested name specifier 'MyEnum::' for declaration does not refer into ...
Moe Bataineh's user avatar
  • 1,080
1 vote
0 answers
65 views

Why is Clang rejecting this coroutine code?

Here's the code: #include <generator> std::generator<int> foo() { int i{}; while (true) { co_yield i++; } } Clang 18.1.8 rejects it with /usr/bin/../lib64/gcc/x86_64-...
Enlico's user avatar
  • 26.7k
0 votes
0 answers
18 views

LLVM DAG Pattern Instruction Selection Fails after introducing a new intrinsic

I am currently expanding a RISC-V core with a custom load instruction. For this question, the specifics are unimportant. It functionally behaves like a normal load instruction and should use the same ...
Florian S.'s user avatar
-1 votes
0 answers
45 views

why my LLDB Debugger is not working even though everythign is correct

I'm a simply a DSA solving student. and since Clion hog lots of RAM. I shifted to VSCode and I'm more intrested in Clang instead of gcc or g++ due to its fast compilation and better diagonstic ability ...
UUC110's user avatar
  • 27
-2 votes
0 answers
73 views

What does MSVC-like command line mean when using Clang compiler on Windows?

So I have installed the Clang tools on Visual Studio on Windows, and this lets me use the Clang compiler in Visual Studio. In my CMake I set the toolchain argument to 'ClangCL' and it sets it up ...
Zebrafish's user avatar
  • 12.8k
0 votes
0 answers
34 views

How to cross compile Clang/LLVM to musl with cmake?

I've been trying to build Clang/LLVM for a different C standard library, namely musl. If I build Clang for my host system (x86_64 Linux, glibc), I can build a binary written in C for musl by passing --...
popovicu's user avatar
  • 101

15 30 50 per page
1
2 3 4 5
701