LLVM API Documentation
00001 //===- AsmCond.h - Assembly file conditional assembly ----------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 00010 #ifndef LLVM_MC_MCPARSER_ASMCOND_H 00011 #define LLVM_MC_MCPARSER_ASMCOND_H 00012 00013 namespace llvm { 00014 00015 /// AsmCond - Class to support conditional assembly 00016 /// 00017 /// The conditional assembly feature (.if, .else, .elseif and .endif) is 00018 /// implemented with AsmCond that tells us what we are in the middle of 00019 /// processing. Ignore can be either true or false. When true we are ignoring 00020 /// the block of code in the middle of a conditional. 00021 00022 class AsmCond { 00023 public: 00024 enum ConditionalAssemblyType { 00025 NoCond, // no conditional is being processed 00026 IfCond, // inside if conditional 00027 ElseIfCond, // inside elseif conditional 00028 ElseCond // inside else conditional 00029 }; 00030 00031 ConditionalAssemblyType TheCond; 00032 bool CondMet; 00033 bool Ignore; 00034 00035 AsmCond() : TheCond(NoCond), CondMet(false), Ignore(false) {} 00036 }; 00037 00038 } // end namespace llvm 00039 00040 #endif