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.

39 lines
1.9 KiB

  1. //========= Copyright � 1996-2006, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Clang utility code
  4. //
  5. //=====================================================================================//
  6. #ifndef CLANG_UTILS_H
  7. #define CLANG_UTILS_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tier1/utlvector.h"
  12. class CUtlString;
  13. // Generate the appropriate Clang command for the given file/platform/compiler/defines/include-paths/flags
  14. // - 'DLLArguments' fills in an ICommandLine which can be used with libclang.dll (clang_parseTranslationUnit, etc)
  15. // 'CommandLine' generates a string which can be used as input to clang.exe on the command-line.
  16. // - 'pchName' specifies the name of the PCH file to include/create (empty means no PCH),
  17. // 'bBuildPCH' specifies that this file builds a .pch file (Clang_GenerateCommandLine will generate the output file <pchName>.pch),
  18. // - Supported values for pPlatform: "WIN32", "WIN64", "X360"
  19. // Supported values for pCompiler: "VS2005", "VS2010"
  20. extern bool Clang_GenerateDLLArguments( ICommandLine *pArguments, const char *pFilename, const char *pPlatform, const char *pCompiler,
  21. const CUtlVector< CUtlString > &defines, const CUtlVector< CUtlString > &includePaths,
  22. const CUtlString &pchName, bool bBuildPCH = false, int parseFlags = 0 );
  23. extern bool Clang_GenerateCommandLine( CUtlString &command, const char *pFilename, const char *pPlatform, const char *pCompiler,
  24. const CUtlVector< CUtlString > &defines, const CUtlVector< CUtlString > &includePaths,
  25. const CUtlString &pchName, bool bBuildPCH = false, int parseFlags = 0 );
  26. // Does this have a recognized source file extension? (.cpp, .c)
  27. extern bool Clang_IsSourceFile( const char *pFilename );
  28. // Does this have a recognized header file extension? (.h, .inl)
  29. extern bool Clang_IsHeaderFile( const char *pFilename );
  30. #endif // CLANG_UTILS_H