[PATCH] D136778: [dexter-tests] Add attribute optnone to main function

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 12:03:49 PDT 2022


Carrot created this revision.
Carrot added a reviewer: Orlando.
Herald added a project: All.
Carrot requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The test case optnone-simple-functions.cpp is expected to be compiled unoptimized even under -O2 because of attribute optnone. But this attribute is missed for main function, and caused the fail in https://lab.llvm.org/buildbot/#/builders/217/builds/14046 when it triggered optimizations. This patch fixes that by adding attribute optnone to main function.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136778

Files:
  cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp


Index: cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
===================================================================
--- cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
+++ cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
@@ -90,6 +90,7 @@
 // DexExpectWatchValue('test5_val', 7, from_line=ref('test5_start'), to_line=ref('test5_end'))
 // DexExpectWatchValue('c', 1, 5, from_line=ref('test5_start'), to_line=ref('test5_end'))
 
+__attribute__((optnone))
 int main() {
   int main_result = 0;
   // DexLabel('main_start')


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136778.470890.patch
Type: text/x-patch
Size: 617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221026/ef642b69/attachment.bin>


More information about the llvm-commits mailing list