You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clang and GCC compile and link this successfully. But ClangIR doesn't process the alias attribute and fails to link:
$ cir alias.cpp
/usr/bin/ld: /tmp/alias-7b2e15.o: in function `main':
/local/home/dolsen/upstream/llvm-project/test/alias.cpp:4: undefined reference to `frobble()'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
The bug can be seen in the LLVM IR. Clang creates an alias directive for frobble:
@_Z7frobblev = dso_local alias void (), ptr @_Z9herp_derpv
while ClangIR merely declares the function:
declare !dbg !8 void @_Z7frobblev()
The text was updated successfully, but these errors were encountered:
While working at this, I noticed that LLVM IR dialect GlobalOp does not yet support alias, so we cannot yet lower this information down. Let me file another issue for that.
For now, I'm going to emit a global but not yet set the alias, won't be much better than what we currently have but it's a first step - later on we can just set the alias when MLIR support comes.
Test program:
Clang and GCC compile and link this successfully. But ClangIR doesn't process the
alias
attribute and fails to link:The bug can be seen in the LLVM IR. Clang creates an alias directive for
frobble
:while ClangIR merely declares the function:
The text was updated successfully, but these errors were encountered: