[PATCH] Code Re-factoring: Implementation moved from "VectorUtils.h" to "VectorUtils.cpp"

Ashutosh Nema ashutosh.nema at amd.com
Wed Jun 24 01:28:35 PDT 2015


Hi dblaikie,

In “VectorUtils.h” all functions are defined as static, common problem is if some module 
includes it and only use few functions then compiler throws warning for unused functions.

i.e.
>  llvm/include/llvm/Transforms/Utils/VectorUtils.h:102:1: warning: 
>  ‘llvm::Intrinsic::ID llvm::getIntrinsicIDForCall(llvm::CallInst*, const llvm::TargetLibraryInfo*)’ 
>  defined but not used [-Wunused-function]
>  getIntrinsicIDForCall(CallInst *CI, const TargetLibraryInfo *TLI) {
>  ^

In this change I moved these function implementation to a separate file.

Changes in this patch:
- Moved function definition from “VectorUtils.h” to a separate file “VectorUtils.cpp”
- Now these functions are non-static.
- VectorUtils.h is only having declaration for these.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D10682

Files:
  include/llvm/Transforms/Utils/VectorUtils.h
  lib/Transforms/Utils/CMakeLists.txt
  lib/Transforms/Utils/VectorUtils.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10682.28321.patch
Type: text/x-patch
Size: 15382 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150624/a598f832/attachment.bin>


More information about the llvm-commits mailing list