mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00

Functions, labels etc. aren't sized; respect that when coming across a SymOffExp (and checking whether we can elide a pointer cast to i8* for the GEP).
8 lines
252 B
D
8 lines
252 B
D
// RUN: %ldc -output-ll -of=%t.ll %s && FileCheck %s < %t.ll
|
|
|
|
void foo()
|
|
{
|
|
// CHECK: %1 = getelementptr {{.*}}_D6gh28653fooFZv{{.*}} to i8*), i32 -10
|
|
// CHECK-NEXT: %2 = ptrtoint i8* %1 to i{{32|64}}
|
|
auto addr = (cast(size_t) &foo) - 10;
|
|
}
|