Issue 60601
Summary llvm 16 LLVM ERROR: inconsistency in registered CommandLine options 'debug-counter'
Labels new issue
Assignees
Reporter dietmarfrohboese
    I use some libraries in an other project. The use of llvm::DebugCounter::instance() resultis in runtime error message:

: CommandLine Error: Option 'debug-counter' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Aborted (core dumped)

To reproduce the error message:

clang++ -I/usr/lib/llvm/16/include  -march=native -O2 -pipe -ggdb  -fno-exceptions -fno-rtti -std=c++17 -o ./tst2.cpp.o -c ./tst2.cpp && clang++ -march=native -O2 -pipe ./tst2.cpp.o -o ./tst2 -L/usr/lib/llvm/16/lib64 -Wl,-rpath,/usr/lib/llvm/16/lib64 /usr/lib/llvm/16/lib64/libLLVMSupport.a  /usr/lib/llvm/16/lib64/libLLVM-16.so -lrt  -ldl  -lm  /usr/lib64/libz.so  /usr/lib64/libtinfo.so /usr/lib/llvm/16/lib64/libLLVMDemangle.a

file tst2.cpp:

`
#include <llvm/Support/DebugCounter.h>

int main(int argc, char **argv) {
  llvm::DebugCounter &DC = llvm::DebugCounter::instance();
  return 0;
}
`
I tested with llvm-16.0.0_rc1. The llvm 15 works.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to