Advertisement
eudoxia

Clang++ Type Name 'Mangling'

Apr 2nd, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. The code:
  2.  
  3. #include <gsl/gsl_matrix.h>
  4. #include <gsl/gsl_vector.h>
  5.  
  6. int main()
  7. {
  8. gsl_matrix a;
  9. gsl_vector b;
  10. return 0;
  11. }
  12.  
  13. With the command:
  14.  
  15. clang++ ffigen.cpp -S -emit-llvm
  16.  
  17. Compiles to:
  18.  
  19. ; ModuleID = 'ffigen.cpp'
  20. [...]
  21.  
  22. %0 = type { i64, i64, double*, %struct.gsl_block_struct*, i32 }
  23. %struct.anon = type { i64, i64, i64, double*, %struct.gsl_block_struct*, i32 }
  24. %struct.gsl_block_struct = type { i64, double* }
  25.  
  26. define i32 @main() nounwind {
  27. [...]
  28. %a = alloca %struct.anon, align 8
  29. %b = alloca %0, align 8
  30. [...]
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement