-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Backport to 14] Don't add initializer to local variables with extern…
…al linkage. (#2644) If a variable is external, it will be defined during linking, the translator should not do it. Signed-off-by: Marcos Maronas <marcos.maronas@intel.com>
- Loading branch information
1 parent
f238450
commit 2823e70
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
; RUN: llvm-as %s -o %t.bc -opaque-pointers | ||
; RUN: llvm-spirv %t.bc -o %t.spv -opaque-pointers | ||
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc -opaque-pointers | ||
; RUN: llvm-dis %t.rev.bc -o %t.rev.ll -opaque-pointers | ||
; RUN: FileCheck < %t.rev.ll %s --check-prefix CHECK-LLVM | ||
|
||
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64-G1" | ||
target triple = "spir64-unknown-unknown" | ||
@__LocalVar = external addrspace(3) global ptr addrspace(1) | ||
; CHECK-LLVM:@__LocalVar = external addrspace(3) global ptr addrspace(1) |