brintos

brintos / llvm-project-archived public Read only

0
0
Text · 956 B · 83767ec Raw
24 lines · cpp
1// RUN: %clang_cc1 -std=c++11 -emit-llvm -o %t-c++11.ll %s -triple x86_64-apple-darwin102// RUN: FileCheck %s < %t-c++11.ll3// RUN: %clang_cc1 -std=c++17 -emit-llvm -o %t-c++17.ll %s -triple x86_64-apple-darwin104// RUN: FileCheck %s < %t-c++17.ll5// RUN: %clang_cc1  -std=c++98 -emit-llvm -o %t.ll %s -triple x86_64-apple-darwin106// RUN: %clang_cc1  -std=c++03 -emit-llvm -o %t-c++03.ll %s -triple x86_64-apple-darwin107// RUN: diff %t-c++11.ll  %t-c++17.ll8// RUN: diff %t.ll  %t-c++03.ll9 10struct sAFSearchPos {11    unsigned char *pos;12    unsigned char count;13};14 15static volatile struct sAFSearchPos testPositions;16// CHECK: @_ZL13testPositions = internal global %struct.sAFSearchPos zeroinitializer17 18static volatile struct sAFSearchPos arrayPositions[100][10][5];19// CHECK: @_ZL14arrayPositions = internal global [100 x [10 x [5 x %struct.sAFSearchPos]]] zeroinitializer20 21int main() {22  return testPositions.count + arrayPositions[10][4][3].count; 23}24