2011-02-16 01:40:07 +00:00
|
|
|
//===--- port.h - OS/cpu specific stuff for include-what-you-use ----------===//
|
2011-02-08 06:12:32 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Source file for architecture-specific logic.
|
|
|
|
|
|
|
|
#ifndef DEVTOOLS_MAINTENANCE_INCLUDE_WHAT_YOU_USE_PORT_H_
|
|
|
|
#define DEVTOOLS_MAINTENANCE_INCLUDE_WHAT_YOU_USE_PORT_H_
|
|
|
|
|
2011-03-04 00:29:56 +00:00
|
|
|
#include <assert.h>
|
|
|
|
#define CHECK_(x) assert(x)
|
|
|
|
|
2011-02-08 06:12:32 +00:00
|
|
|
#if defined(_MSC_VER)
|
|
|
|
|
|
|
|
# define NOMINMAX
|
|
|
|
# include <windows.h>
|
|
|
|
|
|
|
|
# define getcwd _getcwd
|
|
|
|
# define snprintf _snprintf
|
|
|
|
|
|
|
|
// Get a windows-equivalent fnmatch()
|
|
|
|
# include "Shlwapi.h" // For PathMatchSpec
|
|
|
|
# pragma comment(lib, "Shlwapi.lib")
|
|
|
|
# define fnmatch(pattern, filepath, flags) (!PathMatchSpec(filepath, pattern))
|
|
|
|
|
2011-02-08 19:43:58 +00:00
|
|
|
// FIXME: This undef is necessary to prevent conflicts between llvm
|
|
|
|
// and Windows headers. Eventually fnmatch functionality
|
|
|
|
// should be wrapped inside llvm's PathV2 library.
|
|
|
|
# undef interface // used in Shlwapi.h
|
|
|
|
|
2011-02-08 06:12:32 +00:00
|
|
|
#endif // #if defined(_MSC_VER)
|
|
|
|
|
|
|
|
#endif // DEVTOOLS_MAINTENANCE_INCLUDE_WHAT_YOU_USE_PORT_H_
|