Author: Pavel Labath
Date: 2024-06-27T17:46:27+02:00
New Revision: 2fefc042ce8faf8516ae66e1529d87c7130094a1

URL: 
https://github.com/llvm/llvm-project/commit/2fefc042ce8faf8516ae66e1529d87c7130094a1
DIFF: 
https://github.com/llvm/llvm-project/commit/2fefc042ce8faf8516ae66e1529d87c7130094a1.diff

LOG: [lldb/test] Fix enum-declaration-uniqueness.cpp

Dereferencing a pointer variable without a running process does not work
on every arch/os. Fix the test to x86-linux, where it is known to work.

Added: 
    lldb/test/Shell/SymbolFile/DWARF/x86/enum-declaration-uniqueness.cpp

Modified: 
    

Removed: 
    lldb/test/Shell/SymbolFile/DWARF/enum-declaration-uniqueness.cpp


################################################################################
diff  --git a/lldb/test/Shell/SymbolFile/DWARF/enum-declaration-uniqueness.cpp 
b/lldb/test/Shell/SymbolFile/DWARF/x86/enum-declaration-uniqueness.cpp
similarity index 75%
rename from lldb/test/Shell/SymbolFile/DWARF/enum-declaration-uniqueness.cpp
rename to lldb/test/Shell/SymbolFile/DWARF/x86/enum-declaration-uniqueness.cpp
index 6fc47d7e4b53a..20322f1ccc37b 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/enum-declaration-uniqueness.cpp
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/enum-declaration-uniqueness.cpp
@@ -1,6 +1,8 @@
-// RUN: %clangxx_host -gdwarf -c -o %t_a.o %s -DFILE_A
-// RUN: %clangxx_host -gdwarf -c -o %t_b.o %s -DFILE_B
-// RUN: %clangxx_host -o %t %t_a.o %t_b.o
+// REQUIRES: lld
+//
+// RUN: %clangxx --target=x86_64-pc-linux -g -c -o %t_a.o %s -DFILE_A
+// RUN: %clangxx --target=x86_64-pc-linux -g -c -o %t_b.o %s -DFILE_B
+// RUN: ld.lld -o %t %t_a.o %t_b.o
 // RUN: %lldb %t \
 // RUN:   -o "target variable my_enum my_enum_ref" -o "image dump ast" \
 // RUN:   -o exit | FileCheck %s
@@ -24,8 +26,6 @@ extern MyEnum my_enum;
 enum MyEnum : int { MyEnum_A };
 
 MyEnum my_enum = MyEnum_A;
-
-int main() {}
 #endif
 #ifdef FILE_B
 MyEnum &my_enum_ref = my_enum;


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to