Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2 KiB

  1. //===- AsmCond.h - Assembly file conditional assembly ----------*- C++ -*-===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef LLVM_MC_MCPARSER_ASMCOND_H
  10. #define LLVM_MC_MCPARSER_ASMCOND_H
  11. namespace llvm {
  12. /// AsmCond - Class to support conditional assembly
  13. ///
  14. /// The conditional assembly feature (.if, .else, .elseif and .endif) is
  15. /// implemented with AsmCond that tells us what we are in the middle of
  16. /// processing. Ignore can be either true or false. When true we are ignoring
  17. /// the block of code in the middle of a conditional.
  18. class AsmCond {
  19. public:
  20. enum ConditionalAssemblyType {
  21. NoCond, // no conditional is being processed
  22. IfCond, // inside if conditional
  23. ElseIfCond, // inside elseif conditional
  24. ElseCond // inside else conditional
  25. };
  26. ConditionalAssemblyType TheCond;
  27. bool CondMet;
  28. bool Ignore;
  29. AsmCond() : TheCond(NoCond), CondMet(false), Ignore(false) {}
  30. };
  31. } // end namespace llvm
  32. #endif