mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 21:56:05 +00:00

lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
36 lines
1010 B
C++
36 lines
1010 B
C++
//===--- SemaUtil.h - Utility functions for semantic analysis -------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file provides a few static inline functions that are useful for
|
|
// performing semantic analysis.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_CLANG_SEMA_UTIL_H
|
|
#define LLVM_CLANG_SEMA_UTIL_H
|
|
|
|
#include "clang/AST/Expr.h"
|
|
|
|
namespace clang {
|
|
|
|
/// Utility method to determine if a CallExpr is a call to a builtin.
|
|
static inline bool isCallBuiltin(CallExpr* cexp) {
|
|
Expr* sub = cexp->getCallee()->IgnoreParenCasts();
|
|
|
|
if (DeclRefExpr* E = dyn_cast<DeclRefExpr>(sub))
|
|
if (E->getDecl()->getIdentifier()->getBuiltinID() > 0)
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
} // end namespace clang
|
|
|
|
#endif
|